package com.huixiaodian.baselibrary.ft_message.service.impl;

import android.content.Context;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.launcher.ARouter;
import com.huixiaodian.baselibrary.ft_message.service.MessageService;

public class MessageImpl {

    @Autowired(name = "/message/message_center")
    protected MessageService messageService;

    private static MessageImpl messageImpl;

    private MessageImpl(){
        ARouter.getInstance().inject(this);
    }

    public static MessageImpl getInstance(){
        if(messageImpl == null){
            synchronized (MessageImpl.class){
                if(messageImpl == null)
                    messageImpl = new MessageImpl();
            }
        }
        return messageImpl;
    }

    public void startMessageActivity(Context context, long id){
        messageService.startMessageActivity(context, id);
    }
}
